﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using wUniApp.WPF.Data;
using wUniApp.WPF.Properties;
using wUniAppPCL;
using wUniAppPCL.Loacalization;
using wUniAppPCL.MVVM;

namespace wUniApp.WPF
{
  /// <summary>
  /// Interaction logic for MainWindow.xaml
  /// </summary>
  public partial class MainWindow : Window
  {
    public MainWindow()
    {
      wLocProvider.SetCulture(Settings.Default.LanguageCode);
      InitializeComponent();
      Loaded += MainWindow_Loaded;
      
    }

    void MainWindow_Loaded(object sender, RoutedEventArgs e)
    {
      DataContext = Model.I;
    }

    private void TextBox_KeyDown(object sender, KeyEventArgs e)
    {
      if (e.Key == Key.Enter)
      {
        Model.I.Search();
      }
    }

  }
}
